styleproperties: Mark "color" and "font" as inherit
authorBenjamin Otte <otte@redhat.com>
Mon, 16 May 2011 17:42:27 +0000 (19:42 +0200)
committerBenjamin Otte <otte@redhat.com>
Wed, 18 May 2011 20:17:57 +0000 (22:17 +0200)
Keeping it identical to CSS 2.1 again

gtk/gtkstyleproperties.c

index 28c2d9a794871c000cb3dc973372fb3138b18274..dc615d24a8112a652356bb28fe4c6b57d81002f4 100644 (file)
@@ -98,26 +98,30 @@ static void
 gtk_style_properties_class_init (GtkStylePropertiesClass *klass)
 {
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
+  GParamSpec *pspec;
 
   object_class->finalize = gtk_style_properties_finalize;
 
   /* Initialize default property set */
-  gtk_style_properties_register_property (NULL,
-                                          g_param_spec_boxed ("color",
-                                                              "Foreground color",
-                                                              "Foreground color",
-                                                              GDK_TYPE_RGBA, 0));
+  pspec = g_param_spec_boxed ("color",
+                              "Foreground color",
+                              "Foreground color",
+                              GDK_TYPE_RGBA, 0);
+  gtk_style_param_set_inherit (pspec, TRUE);
+  gtk_style_properties_register_property (NULL, pspec);
+
   gtk_style_properties_register_property (NULL,
                                           g_param_spec_boxed ("background-color",
                                                               "Background color",
                                                               "Background color",
                                                               GDK_TYPE_RGBA, 0));
 
-  gtk_style_properties_register_property (NULL,
-                                          g_param_spec_boxed ("font",
-                                                              "Font Description",
-                                                              "Font Description",
-                                                              PANGO_TYPE_FONT_DESCRIPTION, 0));
+  pspec = g_param_spec_boxed ("font",
+                              "Font Description",
+                              "Font Description",
+                              PANGO_TYPE_FONT_DESCRIPTION, 0);
+  gtk_style_param_set_inherit (pspec, TRUE);
+  gtk_style_properties_register_property (NULL, pspec);
 
   gtk_style_properties_register_property (NULL,
                                           g_param_spec_boxed ("margin",